import request from '@/utils/request'

export default {
    list() {
        return request({
            url: '/admin/edu/teacher/list',
            method:'get'
        })
    },
    pageList(page,limit,searchObj) {
        return request({
            url: `/admin/edu/teacher/list/${page}/${limit}`,
            method: 'get',
            params:searchObj
        })
    },
    removeById(id) {
        return request({
            url: `/admin/edu/teacher/remove/${id}`,
            method: 'delete'
        })
    },
    save(teacher) {
        return request({
            url: '/admin/edu/teacher/save',
            method: 'post',
            data:teacher
        })
    },
    getInfoById(id) {
        return request({
            url:  `/admin/edu/teacher/get/${id}`,
            method: 'get'
        })
    },
    updateById(teacher) {
        return request({
            url: '/admin/edu/teacher/update',
            method: 'put',
            data:teacher
        })
    },
    batchRemove(idList) {
        return request({
            url: '/admin/edu/teacher/batch-remove',
            method: 'delete',
            data:idList
        })
    },
    selectNameListByKey(key) {
        return request({
            url:  `/admin/edu/teacher/list/name/${key}`,
            method:'get'
        })
    },
}